<?php
include('../../include/functions.inc.php');
include('../../include/inputbuilder.inc.php');
include('../../include/maintenance.inc.php');

$maintenance = unserialize($_SESSION['mCargo']);
$list = $db->query_select("cllg_entity", NULL);
?>
<form id="<?php echo $maintenance->formName; ?>" name="<?php echo $maintenance->formName; ?>" method="POST" action="<?php echo $maintenance->saveNewUrlPage; ?>">
    <table class=""  width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <th scope="col"><legend>DATOS CARGO</legend></th>
            <th scope="col" valign="middle">
            <legend>        
                <div class="btn-group" style="margin-left: 30%">
                    <input value="Continuar" type="button" name="cmdOk" id="cmdOk" class="btn btn-info" onClick="javascript:formOkBt($(this.form),newAction);jQuery('#cmAddcontainer').show();" />
                    <input value="Cancelar" class="btn btn-info" type="button" name="cmdCancel" id="cmdCancel" onClick="loadTable();jQuery('#cmAddcontainer').show();" />
                </div>
            </legend>    
            </th>
        </tr>
        <tr>
            <td colspan="2"><br/>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="25%">NOMBRE</td>
                        <td width="75%"><input name="NOMBRE" type="text" id="NOMBRE" /></td>
                    </tr>
                    <tr>
                        <td>MONTO</td>
                        <td>
                            <input name="MONTO" type="text" id="MONTO" />
                            <input name="CREATED_BY" type="hidden" id="CREATED_BY" value="ES" />
                            <input name="CREATED" type="hidden" id="CREATED" value="<?php echo date(DATE_PATTERN); ?> " />
                        </td>
                    </tr>
                    <tr>
                        <td>MORA</td>
                        <td><input name="MORA" type="text" id="MORA" /></td>
                    </tr>
                    <tr>
                        <td>UTILIZAR PARA CHEQUE RECHAZADO</td>
                        <td><input name="CHEQUE_RECHAZADO" type="checkbox" id="CHEQUE_RECHAZADO" value="1" /></td>
                    </tr>
                    <tr>
                        <td>ENTIDAD</td>
                        <td>
                            <select name="FK_ENTITY" id="FK_ENTITY">
                                <?php
                                foreach ($list as $it) {
                                    ?>
                                    <option value="<?php echo $it["ID"]; ?>"><?php echo $it["NAME"]; ?> </option>
                                    <?php
                                }
                                ?>
                            </select>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">&nbsp;</td>
        </tr>
    </table>
</form>